package com.th.service;

import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

/**
 * @author ErrorRua
 * @date 2023/06/25
 * @description:
 */
public interface SSEService {
    /**
     * @param userId
     * @param message
     * @return void
     * @description: 发送消息
     */
    void sendMessage(Long userId, String message);

    /**
     * @return void
     * @description: 移除用户
     */
    void disconnect(Long userId);

    /**
     * @return void
     * @description: 连接用户
     */
    SseEmitter connect();
}
